from django.db import models


class Users(models.Model):
    STATUS = (
        (0, '正常'),
        (1, '已注销'),
    )
    username = models.CharField("用户名", max_length=64)
    nickname = models.CharField("用户昵称", max_length=64, null=True)
    email = models.EmailField("邮箱地址")
    password = models.CharField("密码", max_length=32)
    phone = models.CharField("电话", max_length=24, null=True)
    is_admin = models.BooleanField("是否管理员", default=False)
    status = models.IntegerField("状态", default=0, choices=STATUS)
